<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    
    <ui:composition template="/views/_template.xhtml">
        <ui:define name="corpo">
            <fieldset>
               <legend align="left"><h:outputText value="Lançamento" /></legend>
                  <h:form>  
                     <h:messages style="color: red"/>
                     <p/>
                     <h:outputLabel value="Conta  "/>
                     <h:selectOneMenu value="#{documentoBean.lancamento.conta}" converter="entityConverter">
                        <f:selectItems value="#{contaBean.contas}" var="conta" itemLabel="#{conta.nome}"/>
                        <f:selectItem itemLabel="Selecione uma conta"/>
                     </h:selectOneMenu>
                     <p/>
                     <h:outputLabel value="Número do Lançamento  "/>
                     <h:inputText size="05" value="#{documentoBean.lancamento.numero}" />
                     <p/>
                     <h:outputLabel value="Data do Pagamento  "/>
                     <p:inputMask size="08" mask="99/99/9999" value="#{documentoBean.lancamento.dataPagamento}">
                        <f:convertDateTime dateStyle="medium" timeZone="America/Sao_Paulo" />
                     </p:inputMask>
                     <p/>
                     <h:outputLabel value="Valor  "/>
                     <h:inputText size="15" value="#{documentoBean.lancamento.valorPagamento}" />
                     <p/>
                     <h:outputLabel value="Situação  "/>
                     <h:inputText size="10" value="#{documentoBean.lancamento.situacao}" />
                     <p/>
                     <h:commandButton value="Gravar" action="#{documentoBean.alterarLancamento()}" />      
                     <h:commandButton value="Voltar" action='/operador/incluirDocumento' immediate="true"/>
                 </h:form>
             </fieldset>
        </ui:define>
    </ui:composition>
</html>
   
  